<template>
  <a-button @click="exportExcelClick" class="export-excel-button">
    导出excel
  </a-button>
</template>

<script>
import {uploadProcess} from "@/api/linYi";
import {message} from 'ant-design-vue';
import {downLoadFileByBlob} from "@/components/buttonAboutExcel/utils";

export default {
  name: "ButtonAboutExcel",
  methods: {
    exportExcelClick() {
      uploadProcess({
        status: '1',
        order: 'asc',
        offset: 0,
        like: '',
        limit: 999999
      }).then(res => {
        if (res.success) {
          downLoadFileByBlob(res.data, "流程")
          
        } else {
          message.error('下载excel错误')

        }
      })
    }
  }
}
</script>

<style scoped>

</style>
